package top.songxs.gmall.rabbit.constant;

public interface MqConstant {
    //发送订单延迟消息的交换机名称
    String ORDER_EXCHANGE_NAME = "order.exchange";  //订单交换机  和死信交换机共用这一个
    String ORDER_QUEUE_NAME = "order.queue";  //订单发送消息的队列
    Integer ORDER_TTL = 30*1000*60;  //消息的存活时间  30分钟
    String DEAD_LETTER_MSG_ROUTING_KEY = "close.info"  ; // 死信队列的路由键
    String ORDER_MSG_ROUTING_KEY = "order.info"  ; // 订单消息的路由键
    String CLOSE_QUEUE_NAME = "close.queue";  //死信队列名称


    //重试相关配置
    String REDIS_MSG_RETRY_COUNT = "msg:retry:count:" ;


     String PAYED_QUEUE = "order.payed.queue" ; //订单支付后进行发消息，队列
    public static final String PAYED_ROUTING_KEY = "payed" ;

    //支付成功扣减库存
     String QUEUE_WARE_STOCK  = "queue.ware.stock";

     String EXCHANGE_DIRECT_WARE_STOCK = "exchange.direct.ware.stock";

     String ROUTING_WARE_STOCK = "ware.stock";

    /**
     * 减库存成功，更新订单状态
     */
   String EXCHANGE_DIRECT_WARE_ORDER = "exchange.direct.ware.order";
     String ROUTING_WARE_ORDER = "ware.order";
    //队列
    String QUEUE_WARE_ORDER  = "queue.ware.order";

    String OUT_OF_STOCK = "OUT_OF_STOCK"; //已经付款，库存超卖
   String  DEDUCTED = "DEDUCTED";  //已经付款，出库成功




}
